package cn.demoncat.util.xml.entity;

/**
 * XStream 集合/数组的标签合并处理参数
 * 
 * 默认Xtream转换集合时，会以集合为父节点，元素类为子节点，如 <list><string>1<string/><string>2<string/></list>
 * 在调用时传递本参数指定"集合归属类、集合属性名、元素类"，就会忽略集合节点，并以多个同名节点表示元素，如 <list>1<list/><list>2</list>
 * 
 * @author 延晓磊
 *
 * @since 2019年10月11日
 */
public class XStreamCollectionParam {

	/**
	 * 集合归属的实体类型
	 */
	private Class<?> entityClass;
	/**
	 * 集合名称
	 */
	private String name;
	/**
	 * 集合元素节点名称，如果为空则使用集合名称
	 */
	private String eleName;
	/**
	 * 集合元素的类型
	 */
	private Class<?> eleClass;
	
	public XStreamCollectionParam(Class<?> entityClass, String name, Class<?> eleClass) {
		super();
		this.entityClass = entityClass;
		this.name = name;
		this.eleName = name;
		this.eleClass = eleClass;
	}
	public XStreamCollectionParam() {
		super();
	}
	public XStreamCollectionParam(Class<?> entityClass, String name, String eleName, Class<?> eleClass) {
		super();
		this.entityClass = entityClass;
		this.name = name;
		this.eleName = eleName;
		this.eleClass = eleClass;
	}
	public Class<?> getEntityClass() {
		return entityClass;
	}
	public void setEntityClass(Class<?> entityClass) {
		this.entityClass = entityClass;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getEleName() {
		return eleName;
	}
	public void setEleName(String eleName) {
		this.eleName = eleName;
	}
	public Class<?> getEleClass() {
		return eleClass;
	}
	public void setEleClass(Class<?> eleClass) {
		this.eleClass = eleClass;
	}
	
	
}
